package com.sprouting.personal.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sprouting.personal.annotations.CheckLength;
import com.sprouting.personal.annotations.CheckNotNull;
import com.sprouting.personal.model.common.BaseModel;
import com.sprouting.personal.model.common.jsr.AddGroup;
import com.sprouting.personal.model.common.jsr.UpdGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 影视
 *
 * @author ：LX（长沙麓谷）
 * @date 创建时间： 2022/12/16 13:20
 */
@Data
@TableName("ps_movies")
public class Movies extends BaseModel {

    /**
     * 主键
     */
    @TableId
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @Null(message = "无效ID", groups = AddGroup.class)
    private String id;
    /**
     * 隶属用户ID
     * @see User#getId()
     */
    private String userId;
    /**
     * 类型ID
     * @see Dict#getId()
     */
    @CheckNotNull(message = "请选择影视类型")
    private String typeId;
    /**
     * 影视名称
     */
    @CheckLength(min = 1, max = 200, message = "影视名称超过长度限制")
    @CheckNotNull(message = "请输入影视名称")
    private String name;
    /**
     * 导演
     */
    @CheckLength(min = 1, max = 200, message = "导演名字超过长度限制")
    @CheckNotNull(message = "请输入导演名字")
    private String director;
    /**
     * 主演
     */
    private String toStar;
    /**
     * 海报图片
     */
    private String icoPath;
    /**
     * 描述
     */
    private String describe;
    /**
     * 上映年份
     */
    private String publicationYear;
    /**
     * 观看地址
     * @see com.sprouting.personal.interfaces.common.Constant.ConfigCode#VIEWING_ADDRESS 默认地点
     */
    private String locale;
    /**
     * 点评
     */
    private String comment;
    /**
     * 是否追更
     * @see com.sprouting.personal.interfaces.common.Constant.YesOrNo#YES 继续追更
     */
    private Integer continueSee;
    /**
     * 观看进度
     * @see com.sprouting.personal.interfaces.common.Constant.ReadingProgress
     */
    private Integer speedOfProgress;
    /**
     * 已看到多少
     */
    private String page;
    /**
     * 评分，星星 1-5 ，最高5星
     */
    @NotNull(message = "请进行评分")
    private Integer grade;

}
